package com.zjhb.entity;

import java.util.Objects;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

import com.zjhb.common.controller.ExcelIgnore;

@javax.persistence.Entity
@javax.persistence.Table(name = "user", schema = "army", catalog = "")
public class UserEntity {
	@ExcelIgnore
    private String id;
    private String name;
    @ExcelIgnore
    private String password;
    private String realName;
    @ExcelIgnore
    private String types;
    @ExcelIgnore
    private String status;
    @ExcelIgnore
    private String phone;
    @ExcelIgnore
    private String depatmentId;
    @ExcelIgnore
    private String info;
    @ExcelIgnore
    private String statusDesc;
    private String depatmentDesc;
    private String typesDesc;
    
    
    @Transient
    public String getStatusDesc() {
		return statusDesc;
	}

	public void setStatusDesc(String statusDesc) {
		this.statusDesc = statusDesc;
	}
	@Transient
	public String getDepatmentDesc() {
		return depatmentDesc;
	}

	public void setDepatmentDesc(String depatmentDesc) {
		this.depatmentDesc = depatmentDesc;
	}
	@Transient
	public String getTypesDesc() {
		return typesDesc;
	}

	public void setTypesDesc(String typesDesc) {
		this.typesDesc = typesDesc;
	}

	@javax.persistence.Basic
    @javax.persistence.Column(name = "info")
    public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	@javax.persistence.Basic
    @javax.persistence.Column(name = "depatment_id")
    public String getDepatmentId() {
		return depatmentId;
	}

	public void setDepatmentId(String depatmentId) {
		this.depatmentId = depatmentId;
	}

	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "real_name")
    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    @javax.persistence.Basic
    @javax.persistence.Column(name = "types")
    public String getTypes() {
        return types;
    }

    public void setTypes(String types) {
        this.types = types;
    }
    
    
    @javax.persistence.Column(name = "status")
    public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@javax.persistence.Column(name = "phone")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserEntity that = (UserEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(name, that.name) &&
                Objects.equals(password, that.password) &&
                Objects.equals(realName, that.realName) &&
                Objects.equals(types, that.types);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, name, password, realName, types);
    }
}
